const express = require('express')
const multer = require('multer')
const path = require('path')
const expressJoi = require('@escook/express-joi')

const upload = multer({
    dest:path.join(__dirname,'../uploads')
})


const { add_article_schema } = require('../schema/article')

const router = express.Router()

const {addArticle} = require('../router_handler/article')

router.post('/add',upload.single('cover_img'),addArticle)
// router.post('/add',addArticle)

module.exports = router